Database-Driven Web Development by Thomas Valentine

Database-Driven Web Development by Thomas Valentine

Author:Thomas Valentine
Language: eng
Format: epub
ISBN: 9781484259702
Publisher: Apress


function moveback() {

document.getElementById('header').style.position="relative";

}

</script>

</head>

<body>

<h1 id="header" onmouseover="moveleft()" onmouseout="moveback()">Mouse over this text</h1>

</body>

</html>

Listing 5-7Positioning page elements

Notice that the style.left attribute was stated as the second statement within the JavaScript function. This is the value, in pixels, that the browser will use to position the content. Notice also that you don’t have to use the style.left attribute if you’re positioning relatively.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.